-- Services local TweenS = game:service("TweenService") ------------- -- UTILS -- local Utils = {} function Utils:Create(InstData, Props) local Obj = Instance.new(InstData[1], InstData[2]) for k, v in pairs (Props) do Obj[k] = v end; return Obj end function Utils:CNR(cf) -- CFrameNoRotate return CFrame.new(cf.x,cf.y,cf.z) end -- LEGACY FUNCTIONS WITH ADDED FEATURES function Utils:ezweld(p, a, b, cf, c1) local weld = Instance.new("Weld",p) weld.Part0 = a weld.Part1 = b weld.C0 = cf if c1 then weld.C1 = c1 end return weld end function Utils:NewSound(p, id, pit, vol, loop, autoplay) local Sound = Instance.new("Sound",p) Sound.Pitch = pit Sound.Volume = vol Sound.SoundId = "rbxassetid://" ..id Sound.Looped = loop if autoplay then Sound:Play() end return Sound end ----------- local grip = CFrame.new(0, -.6, .85) local Tool = Utils:Create({"Tool", owner.Backpack}, { Name = "Tool Gun", Grip = grip }); local handle = Utils:Create({"Part", Tool}, { Size = Vector3.one, Name = "Handle" }); local mesh = Utils:Create({"SpecialMesh", handle}, { MeshId = "rbxassetid://10153220907", TextureId = "rbxassetid://10153224024", Scale = Vector3.one * .2 }); local pew = Utils:NewSound(handle, 7496207231, 1, 2.5) local pewsounds = {7279939238, 9111013903, 9111014234, 7279939509} for i,v in pairs (pewsounds) do pewsounds[i] = "rbxassetid://" ..tostring(v) end -- localscrip stuffs!! print("Press F to change modes") local LS = NLS([[ local Tool = script.Parent local Shoot = Tool:WaitForChild("Shoot") local Swap = Tool:WaitForChild("Swap") local Mouse = owner:GetMouse() local UIS = game:service("UserInputService") UIS.InputBegan:connect(function(i, t) if not t and i.KeyCode == Enum.KeyCode.F then Swap:FireServer() end end) Tool.Activated:connect(function() Shoot:FireServer({ Hit = Mouse.Hit, Target = Mouse.Target, UnitRay = Mouse.UnitRay, }) end) ]], Tool) -- extra stuff local SWM = Instance.new("WorldModel", script) -- shoot world model (for things u want the gun to ignore) local IGNORES = Instance.new("Folder", script) -- things u want to ignore, but needs physics -- ummmmm modes local Balloons = {} local Roping = false local RopePos = {} local Welding = false local WeldPos = {} local Modes = { ["Balloon"] = function(m) local Base = Utils:Create({"Part", IGNORES}, { Size = Vector3.one * 0, Massless = true, CanCollide = false, Transparency = 1, CFrame = m.Hit }); Utils:Create({"WeldConstraint", Base}, {Part0 = Base, Part1 = m.Target}) local M = Instance.new("Model", script) local H = Instance.new("Humanoid", M) local Balloon = Utils:Create({"Part", M}, { Size = Vector3.one * 2, Color = Color3.new(1, 1, 0), Material = "SmoothPlastic", CFrame = m.Hit + Vector3.one * 2, --Massless = true, Shape = "Ball", }); Utils:Create({"BodyVelocity", Balloon}, { Velocity = Vector3.new(0, 75, 0), -- was 50 MaxForce = Vector3.new(0, 1300, 0) -- was 1000 }); Balloon:SetNetworkOwner(nil); Utils:Create({"SpecialMesh", Balloon}, { MeshId = "rbxassetid://4474539458", Scale = Vector3.one * .2 }); local Gyro = Utils:Create({"BodyGyro", nil}, { MaxTorque = Vector3.new(100000, 100000, 100000), P = 1000, D = 50 }) local IDX = #Balloons + 1 H.HealthChanged:connect(function() Base:Destroy() M:Destroy() --table.remove(Balloons, IDX) end); --table.insert(Balloons, {BA = Balloon, G = Gyro, B = Base}) local Attach1 = Instance.new("Attachment", Base) local Attach2 = Utils:Create({"Attachment", Balloon}, {Position = Vector3.new(0, -1.484 / 2, 0)}) local Rod = Utils:Create({"RodConstraint", Base}, { Attachment0 = Attach2, Attachment1 = Attach1, Visible = true, Thickness = .15, Color = BrickColor.new("Brown") }) end, ["Rope"] = function(m) local Base = Utils:Create({"Part", IGNORES}, { Size = Vector3.one * 0, Massless = true, CanCollide = false, Transparency = 1, CFrame = m.Hit }); Utils:Create({"WeldConstraint", Base}, {Part0 = Base, Part1 = m.Target}) table.insert(RopePos, Instance.new("Attachment", Base)) local WasRope = Roping Roping = true if WasRope then local Rope = Utils:Create({"RopeConstraint", Base}, { Attachment0 = RopePos[1], Attachment1 = RopePos[2], Visible = true, Thickness = .15, Color = BrickColor.new("Brown") }); Roping = false; table.clear(RopePos) end end, ["Weld"] = function(m) if m.Target then table.insert(WeldPos, m.Target) local WasWeld = Welding Welding = true if WasWeld then if WeldPos[1].Parent:IsA("Model") then WeldPos[2].Parent = WeldPos[1].Parent elseif WeldPos[2].Parent:IsA("Model") then WeldPos[1].Parent = WeldPos[2].Parent end local Rope = Utils:Create({"WeldConstraint", WeldPos[1]}, { Part0 = WeldPos[1], Part1 = WeldPos[2], }); Welding = false; table.clear(WeldPos) end end end, ["Wheel"] = function(m) if m.Target then local wheel = Utils:Create({"Part", script}, { Shape = "Cylinder", Size = Vector3.new(1, 4, 4), Color = Color3.new(0, 0, 0), CFrame = m.Hit * CFrame.Angles(0, -math.pi/2, 0) * CFrame.new(-.4, 0, 0), RightSurface = "Hinge", Anchored = false, }); task.spawn(function() if m.Target.Anchored == false then wheel:SetNetworkOwner(m.Target:GetNetworkOwner()); m.Target:MakeJoints(); wheel:MakeJoints() end task.wait(.015) m.Target:MakeJoints(); wheel:MakeJoints() task.wait() m.Target:MakeJoints(); wheel:MakeJoints() wheel.Anchored = false task.wait() m.Target:MakeJoints(); wheel:MakeJoints() task.wait(.05) m.Target:MakeJoints(); wheel:MakeJoints() end) if m.Target.Parent:IsA("Model") then wheel.Parent = m.Target.Parent end end -- wheel:SetNetworkOwner(m.Target:GetNetworkOwner()) --[==[local wee = Instance.new("Attachment", wheel); wee.Position = m.Hit.lookVector * .5 local wee2 = Instance.new("Attachment", m.Target); wee2.WorldPosition = m.Hit.p Utils:Create({"HingeConstraint", wheel}, { Attachment0 = wee, Attachment1 = wee2, ActuatorType = "Motor" })]==] end, }; local ModeSwaps = {"Balloon", "Rope", "Weld", "Wheel"} local ModeCount = 3; local Mode = "Balloon" -- activation stuffs!! local FirePos = Utils:Create({"Attachment", handle}, { Position = Vector3.new(0, 1.75, -14.629 / 2) * .2 }) local RP = RaycastParams.new() -- ray params local ShockSurf, ShockDec local function InitShock() -- init shot effect ShockSurf = Utils:Create({"SurfaceGui"}, { LightInfluence = 0, Name = string.char(math.random(1, 100)) ..tostring(math.random()) }) ShockDec = Utils:Create({"ImageLabel", ShockSurf}, { Size = UDim2.new(1, 0, 1, 0), BackgroundTransparency = 1, Image = "rbxassetid://1057939773", ImageColor3 = Color3.new(.5, .75, 1), }); end; InitShock() local IDX = 0 local function Shoot(m) coroutine.wrap(function() pew.SoundId = pewsounds[math.random(1, #pewsounds)] pew:Play() RP.FilterDescendantsInstances = {Tool, Tool.Parent, IGNORES} local GIDX = IDX + 1; IDX += 1 local r = workspace:Raycast(m.UnitRay.Origin, m.UnitRay.Direction * 1000, RP) if r then m.Hit = CFrame.new(r.Position, r.Position + r.Normal) else return end -- ring wave thing local a, b = xpcall(function() ShockSurf.Parent = script end, function() InitShock() end) ShockDec.ImageTransparency = 0 local ring = Utils:Create({"Part", SWM}, { Anchored = true, CanCollide = false, Transparency = 1, Size = Vector3.new(1, 1, .025), CFrame = CFrame.new(m.Hit.p, m.Hit.p + r.Normal), Locked = true, Name = "p" ..tostring(math.random()) }); ShockSurf.Adornee = ring TweenS:Create(ShockDec, TweenInfo.new(.2 * 1.25), {ImageTransparency = 1}):Play() TweenS:Create(ring, TweenInfo.new(.2 * 1.25), {Size = Vector3.new(5, 5, .025)}):Play() task.delay(.2 * 1.25, function() if IDX == GIDX or ShockSurf.Parent == ring then ShockSurf.Parent = script end task.wait(.1) if IDX == GIDX or ShockSurf.Parent == ring then ShockSurf.Parent = script end ring:Destroy() end) game.Debris:AddItem(ring, .2 * 1.25) -- beam local mattach = Instance.new("Attachment", ring) local beam = Utils:Create({"Beam", handle}, { Attachment0 = FirePos, Attachment1 = mattach, Texture = "rbxassetid://1134824633", LightEmission = 1, LightInfluence = 0, Color = ColorSequence.new(Color3.new(.5, .75, 1)), FaceCamera = true, Width0 = 1.5, Width1 = 1.5, TextureSpeed = 10, TextureLength = 2, }) local t = (.2 * 75) for i = 1,t do beam.Transparency = NumberSequence.new((i / t) * 2, i / t) task.wait() end; beam:Destroy() end)() end local function Activated(m) Shoot(m) -- cool shoot effect Modes[Mode](m) -- shoot func thing -- animation TweenS:Create(Tool, TweenInfo.new(.15), {Grip = grip * CFrame.new(0, -.05, -.2) * CFrame.Angles(math.rad(-2), 0, 0)}):Play() task.wait(.15) TweenS:Create(Tool, TweenInfo.new(.15), {Grip = grip}):Play() end -- remotes for localscrip Utils:Create({"RemoteEvent", Tool}, { Name = "Shoot", }).OnServerEvent:connect(function(_, MOUS) Activated(MOUS) end) Utils:Create({"RemoteEvent", Tool}, { Name = "Swap" }).OnServerEvent:connect(function() ModeCount += 1 if ModeCount > #ModeSwaps then ModeCount = 1 end Mode = ModeSwaps[ModeCount] print("Swapped to ", Mode, "(might add gui later)") end) -- spawn menu local root = owner.Character.HumanoidRootPart local gui = Instance.new("ScreenGui") gui.Enabled = false gui.Parent = NLS([[ local plr = owner local UIS = game:service("UserInputService") local menu = script.ScreenGui game:service("RunService").RenderStepped:connect(function() if menu.Enabled ~= UIS:IsKeyDown("Q") then owner.CameraMinZoomDistance = UIS:IsKeyDown("Q") and 1 or .5 end menu.Enabled = UIS:IsKeyDown("Q") end) ]], owner.PlayerGui) local main = Utils:Create({"Frame", gui}, { Size = UDim2.new(1, -50*2, 1, -50*2), Position = UDim2.new(.5, 0, .5, 0), AnchorPoint = Vector2.new(.5, .5), BorderColor3 = Color3.fromRGB(59, 59, 59), BackgroundTransparency = .1, }) local HL2sc = .0015 net = nil local spawns = loadstring(game:service("HttpService"):GetAsync("https://spawnlist.youngmacka123.repl.co/spawns.lua")) local ENV = getfenv() ENV.HL2sc = HL2sc ENV.net = net ENV.Utils = Utils setfenv(spawns, ENV) spawns = spawns() local spawnlist = Utils:Create({"Frame", main}, { Size = UDim2.new(1, -25, 1, -25), Position = UDim2.new(.5, 0, .5, 0), AnchorPoint = Vector2.new(.5, .5), BackgroundTransparency = 1, }); local list = Instance.new("UIListLayout", spawnlist) list.FillDirection = Enum.FillDirection.Horizontal list.Padding = UDim.new(0, 25/2) for i,v in spawns.hl2 do local button = Utils:Create({"ImageButton", spawnlist}, { Size = UDim2.new(0, 100, 0, 100), BackgroundTransparency = .5, Image = v.thumb, BackgroundTransparency = 1, }); button.MouseButton1Click:connect(function() v:spwn(root.CFrame * CFrame.new(0, 0, -6)) end) end